package com.xmkj.bearuser.jifen;

import android.content.Context;

import com.common.Entity.DuoBaoDetailsEntity;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;
import com.xmkj.bearuser.R;

import java.util.List;

/**
 * Create by leo
 * 创建日期：2018/5/14
 * 描述：
 */

public class JoinRecordAdapter extends CommonAdapter<DuoBaoDetailsEntity.AllRecordBean> {
    public JoinRecordAdapter(Context context, List<DuoBaoDetailsEntity.AllRecordBean> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, DuoBaoDetailsEntity.AllRecordBean item, int position) {
        holder.setImageAvatar(R.id.iv_img,item.face);
        holder.setText(R.id.tv_name,item.nickname);
        holder.setText(R.id.tv_ip,"ip:"+item.ip);
        holder.setText(R.id.tv_time_date,"您参与了"+item.num+"人次  "+  item.date);

    }

    @Override
    protected int getItemViewLayoutId(int position, DuoBaoDetailsEntity.AllRecordBean item) {
        return R.layout.item_join_record;
    }
}
